*Table A.21: Meal and Snack treatment effects on blood biomarkers
cd ""

use "master_data_adults_child_s13456_shared.dta", clear 
drop meal_control snack_control
gen meal_control=1 if treatment==2
replace meal_control=0 if treatment==1

gen snack_control=1 if treatment==3
replace snack_control=0 if treatment==1

drop if type_id=="X" // **Dropping newborns born during the three years of study
drop if id=="3885553B" //**error in the id number and empty data
drop if id=="3885553G" //**error in the id number and empty data
replace treatment=2 if id=="38855553B" //**retrieving the correct treatment for this id
replace treatment=2 if id=="38855553G" //**retrieving the correct treatment for this id
drop if id=="101aa22c" //**this id does not exist

drop if edi==0
keep if session==1 | session==3

**baseline
set more off
xi:  xtreg nefa i.treatment*i.session, i(id_nb) cluster(hh_id) fe
xi:  xtreg trig i.treatment*i.session, i(id_nb) cluster(hh_id) fe
xi:  xtreg hdl i.treatment*i.session, i(id_nb) cluster(hh_id) fe
xi:  xtreg calc_ldl i.treatment*i.session, i(id_nb) cluster(hh_id) fe
xi:  xtreg glucose i.treatment*i.session, i(id_nb) cluster(hh_id) fe
xi:  xtreg insulin i.treatment*i.session, i(id_nb) cluster(hh_id) fe
xi:  xtreg crp i.treatment*i.session, i(id_nb) cluster(hh_id) fe
xi:  xtreg tas i.treatment*i.session, i(id_nb) cluster(hh_id) fe
